<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <%
        String path = request.getContextPath();
        String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();
    %>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>书籍分类维护</title>
    <%--<link rel="stylesheet" href="<%=basePath%>/css/bootstrap.min.css" />--%>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
          integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">

</head>
<body>
<script type="text/javascript" src="js/jquery-2.0.3.min.js"></script>
<%--	<script type="text/javascript" src="js/bootstrap.min.js"></script>--%>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"
        integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd"
        crossorigin="anonymous"></script>

<table class="table table-bordered table-hover" style="width: 100%">
    <tr>
        <th style="width: 100px">序号</th>
        <th style="width: 100px">分类名称</th>
        <th style="width: 100px">分类描述</th>
        <th style="width: 200px">操作</th>
    </tr>
    <c:forEach items="${categoryList}" var="s" varStatus="vs">
        <tr class="active">
            <td>${vs.index+1}</td>
            <td>${s.categoryName}</td>
            <td>${s.categoryDesc}</td>
            <td><a href="<%=basePath%>/admin/ManagerServlet?op=editCategoryUI&CategoryId=${s.categoryId}">编辑</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <a href="<%=basePath%>/admin/ManagerServlet?op=delCategory&CategoryId=${s.categoryId}"
                   onclick="if(confirm('确定删除'+'  《${s.categoryName}》'+'   分类吗'+'?')===false) return false;">删除</a>
        </tr>
    </c:forEach>
</table>
</body>
</html>